import request2 from '@/utils/request2'
import { download, downloadGet } from '@/utils/request2'
import { materialApiUrl } from '../../config'

export default {
  getPageParameter(data, params) {
    return request2({
      url: materialApiUrl + '/assetAcceptance/getPageParameter', method: 'post', params, data
    })
  },
  // 分页查询
  findListByDetails(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/findListByDetails', method: 'post', params, data
    })
  },
  //-明细月计划物资弹出框
  findMonthDetailsByMonthId(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/findMonthDetailsByMonthId', method: 'post', params, data
    })
  },
  // Detail-批量新增
  createByDetailsList(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/createByDetailsList', method: 'post', params, data
    })
  },
  // 分页查询
  findListByMain(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/findListByMain', method: 'post', params, data
    })
  },
  queryByHistory(params) {
    return request2({
      url: materialApiUrl + '/material-daily/queryByHistory/' + params.id, method: 'get', params
    })
  },
  // 分页查询
  findListCount(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/findListCount', method: 'post', params, data
    })
  },
  print(params) {
    return request2({
      url: materialApiUrl + '/material-daily/print/' + params.id, method: 'get', params
    })
  },
  //Detail-删除
  deleteByByDetailList(data) {
    return request2({
      url: materialApiUrl + '/material-daily/deleteByByDetailList', method: 'post', data
    })
  },
  //Main-删除
  deleteByMain(data) {
    return request2({
      url: materialApiUrl + '/material-daily/deleteByMain', method: 'post', data
    })
  },
  createByMain(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/createByMain', method: 'post', params, data
    })
  },
  editByMain(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/editByMain', method: 'post', params, data
    })
  },
  getProjectByMonthPlan(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/getProjectByMonthPlan', method: 'post', params, data
    })
  },
  getMonthByProjectId(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/getMonthByProjectId/' + params.projectId, method: 'get', params, data
    })
  },
  findListByMainId(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/findListByMainId/' + params.id, method: 'get', params, data
    })
  },
  editByByDetail(data, params) {
    return request2({
      url: materialApiUrl + '/material-daily/editByByDetail', method: 'post', params, data
    })
  },
  addFile(data, params) {
    return materialApiUrl + '/material-daily/addFile'
  },
  deleteFile(data, params) {
    return materialApiUrl + '/material-daily/deleteFile'
  },
  findFileList(data, params) {
    return materialApiUrl + '/material-daily/findFileList'
  }
}
